/**
 * See fleece/COPYRIGHT for copyright information.
 *
 * This file is a part of Fleece.
 *
 * Fleece is free software; you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3.0 of the License, or (at your option)
 * any later version.
 *  
 * This software is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software; if not, see www.gnu.org/licenses
 */

#include "Info.h"
#include "fleece.h"

void Info::printOptions() {

   std::cout << "\
\
Copyright 2016, 2017 Nathan H. Jay\n\n\
Fleece is free software; you can redistribute it and/or modify it under the\n\
terms of the GNU Lesser General Public License as published by the Free\n\
Software Foundation; either version 3.0 of the License, or (at your option)\n\
any later version.\n\n\
This software is distributed in the hope that it will be useful, but WITHOUT\n\
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\n\
details.\n\n\
You should have received a copy of the GNU Lesser General Public License\n\
along with this software; if not, see www.gnu.org/licenses\n\n\
Example usage:\n\
./fleece -as=/usr/bin/as -norm -n=10 -arch=x86_64 -decoders=xed,gnu\n\
\nFleece arguments:\n\
\nDATA:\n\
    -rand                use only random instructions, do not generate extra inputs.\n\
    -n=n                 generate n random byte sequences to begin input generation.\n\
\n\nDECODING:\n\
    -arch=architecture   (MANDATORY) choose from: x84_64, x86_32, aarch64, ppc, ppc_32\n\
    -decoders=dec1,dec2  (MANDATORY) choose from: xed, dyninst, llvm, gnu, capstone\n\
\n\nREASSEMBLY:\n\
    -as=/usr/bin/as      (MANDATORY) absolute path to assembler\n\
    -asopt=-opt1,-opt2   comma sep list of assembler options\n\
                         ex. -asopt=-mregnames,-mpower9\n\
    -asf=/tmp/tmp.s      abosulte path to temporary assembly file produced by Fleece\n\
                         default: /tmp/tmp.s\n\
\n\nREPORTING:\n\
    -o=output_dir        directory where output should be placed (rel. or abs.)\n\
                         default: ./fleece_results/\n\
    -t                   show timing information at the end of execution\n\
    -no-nor              do not normalize the output of decoders before reassembly and reporting\n\
                         Note: turning this on will result in reports being generated for\n\
                         trivial differences. Generally, this should not be used.\n\
    -bytes               print the raw bytes of an instruction before decoding\n\
    -seed=n              specifies the seed for this execution of Fleece\n\
    -pig                 print input generated by each decoder\n\
\n\nMISC:\n\
    -h, --help           print this menu and exit\n\
    -v, --version        print version information and exit\n";
}

void Info::printVersion() {
 std::cout << "Fleece version: " << FLEECE_VERSION_STRING << std::endl;
}
